package com.electric.electric.POJO.Entity.admin;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.HashSet;
import java.util.Set;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SysRole {
    private Integer id;
    private String roleName;
    private String roleCode;
    private String description;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

    // 必须添加权限集合字段
    private Set<SysPermission> permissions = new HashSet<>();

    // 必须添加getter方法
    public Set<SysPermission> getPermissions() {
        return permissions;
    }
}
